home *** CD-ROM | disk | FTP | other *** search
/ Aminet 48 / Aminet 48 (2002)(GTI - Schatztruhe)[!][Apr 2002].iso / Aminet / text / edit / vim60rt.lha / Vim / vim60 / syntax / config.vim < prev    next >
Encoding:
Text File  |  2001-05-09  |  1.8 KB  |  58 lines

  1. " Vim syntax file
  2. " Language:        configure.in script: M4 with sh
  3. " Maintainer:    Christian Hammesr <ch@lathspell.westend.com>
  4. " Last Change:    2001 May 09
  5.  
  6. " Well, I actually even do not know much about m4. This explains why there
  7. " is probably very much missing here, yet !
  8. " But I missed a good hilighting when editing my GNU autoconf/automake
  9. " script, so I wrote this quick and dirty patch.
  10.  
  11.  
  12. " For version 5.x: Clear all syntax items
  13. " For version 6.x: Quit when a syntax file was already loaded
  14. if version < 600
  15.   syntax clear
  16. elseif exists("b:current_syntax")
  17.   finish
  18. endif
  19.  
  20. " define the config syntax
  21. syn match   configdelimiter "[()\[\];,]"
  22. syn match   configoperator  "[=|&\*\+\<\>]"
  23. syn match   configcomment   "\(dnl.*\)\|\(#.*\)"
  24. syn match   configfunction  "\<[A-Z_][A-Z0-9_]*\>"
  25. syn match   confignumber    "[-+]\=\<\d\+\(\.\d*\)\=\>"
  26. syn keyword configkeyword   if then else fi test for in do done
  27. syn keyword configspecial   cat rm eval
  28. syn region  configstring    start=+"+ skip=+\\"+ end=+"+
  29. syn region  configstring    start=+`+ skip=+\\'+ end=+'+
  30. syn region  configstring    start=+`+ skip=+\\'+ end=+`+
  31.  
  32. " Define the default highlighting.
  33. " For version 5.7 and earlier: only when not done already
  34. " For version 5.8 and later: only when an item doesn't have highlighting yet
  35. if version >= 508 || !exists("did_config_syntax_inits")
  36.   if version < 508
  37.     let did_config_syntax_inits = 1
  38.     command -nargs=+ HiLink hi link <args>
  39.   else
  40.     command -nargs=+ HiLink hi def link <args>
  41.   endif
  42.  
  43.   HiLink configdelimiter Delimiter
  44.   HiLink configoperator  Operator
  45.   HiLink configcomment   Comment
  46.   HiLink configfunction  Function
  47.   HiLink confignumber    Number
  48.   HiLink configkeyword   Keyword
  49.   HiLink configspecial   Special
  50.   HiLink configstring    String
  51.  
  52.   delcommand HiLink
  53. endif
  54.  
  55. let b:current_syntax = "config"
  56.  
  57. " vim: ts=4
  58.